﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace ConsoleApplication1
{
    public class DS_mock:IDS
    {
        MyList p = null;
        public override void save(MyList a)
        {
            for (int i = 0; i < a.Count; i++) 
            {
                p[i] = a[i];
            }            
        }       
        public override MyList load()
        {
               return p;           
        }
       
        public override IDS IsReady(string Fname)
        {
           
            path = Fname;
            IDS ret = new DS_yaml();
            string[] ext = path.Split('.');
            if (ext[1] == "mock")
            {
                ret = this;
            }
            else
            {
                if (!(next == null)) ret = next.IsReady(Fname);
            }
            return ret;
        }
    }
}
